interface Post {
    title: string,
    content: string,
    subtitle?: string,      //可选成员
    readonly summary: string //只读成员 不能修改
}

//动态成员
interface Cache {
    [prop:string]: string
}

const cache: Cache = {}
cache.foo = 'value1'


//函数声明
const hello = (name: string): void => {
    console.log(`Hello, ${name}`);
}

function hello2 (name: string, ...rest: number[]): void {
    console.log(`Hello, ${name}`)
    if(rest){
        console.log(rest);
    }
}

hello('typescript')
hello2('typescript')
export {}

